package com.demo.demo.controller;

import com.demo.demo.service.ClassService;
import com.demo.demo.entity.Class;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PageController {
    @Autowired
    private ClassService classService;
    private int i=0;
    @RequestMapping("/find/{id}")
    public Class index(@PathVariable String id)throws Exception{
        i++;
        System.out.println(i);
        return classService.selectClassById(id);
    }


}
